<?php
session_start();
include "../../include/dbFunctions.php";
$tid = $_POST['tid'];
$eid = $_SESSION['eid'];
$now = date(("Y-m-d"));
$query1 = "UPDATE track_detail
            SET track_detail = 0,
                last_modified = null
            WHERE event_id = $eid
            AND track_id = $tid";
$result1 = executeQuery($query1);
if ($result1!=0) {
    $_SESSION['mes']="The record has been updated successfully";
    header('Location: ' . $_SERVER['HTTP_REFERER']);
} else {
    $_SESSION['mes']="Error! Please try again";
    header('Location: ' . $_SERVER['HTTP_REFERER']);
}
?>
